package com.example.udp.config;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class UdpRunner implements InitializingBean {
    @Autowired
    private UDPProcess udpProcess;
    @Override
    public void afterPropertiesSet() throws Exception {
        new Thread(udpProcess).start();
    }
}